package com.syni.mdd.sjb.common.datatreaure.entity.vo.rp.dataBankBusiness;

import com.syni.mdd.sjb.common.component.utils.common.utils.ArithUtil;
import lombok.Data;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

@Data
public class DataBankAnalysisRevenueRpVo {
    private RevenueData  revenueData = new RevenueData();

    @Data
    public static class RevenueData{
        //今日流水
        private Double todayRunningMoney = 0.00d;
        //本周流水
        private Double weekRunningMoney = 0.00d;
        //累计流水
        private Double cumulativeFlow = 0.00d;

        public void setTodayRunningMoney(Double todayRunningMoney) {
            this.todayRunningMoney = ArithUtil.round(todayRunningMoney,2);
        }

        public void setWeekRunningMoney(Double weekRunningMoney) {
            this.weekRunningMoney = ArithUtil.round(weekRunningMoney,2);
        }

        public void setCumulativeFlow(Double cumulativeFlow) {
            this.cumulativeFlow = ArithUtil.round(cumulativeFlow,2);
        }
    }

    private HistoricalRevenueData historicalRevenueData = new HistoricalRevenueData();

    @Data
    public static class HistoricalRevenueData{
        //昨日总流水
        private Double yesRunningAllMoney = 0d;
        //七天内金额
        private Double sevenRunningAllMoney = 0d;
        //30天内金额
        private Double thirtyRunningAllMoney = 0d;
        //半年内
        private Double halfYearRunningAllMoney = 0d;

        //昨日金额
        private List<LineData> yesterdayLineData = new LinkedList<>();
        //7天内
        private List<LineData> sevenLineData = new ArrayList<>();
        //30天内
        private List<LineData> thirtyLineData = new ArrayList<>();
        //半年内
        private List<LineData> halfYearLineData = new ArrayList<>();

        private String businessAdvice = "您在一个月内的营收流水持续增长中，请继续努力，保持增长的势头不要停哦";
    }
}
